home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10077 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: surfnet.nl!sun4nl!xs4all!falstaff
  2. From: falstaff@xs4all.nl (Falstaff)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: HELP! Modifying the EOF in a file!
  5. Date: 14 Mar 1996 23:08:37 GMT
  6. Organization: XS4ALL, networking for the masses
  7. Message-ID: <4ia8tl$cd3@news.xs4all.nl>
  8. References: <4i585k$4ia@news.netam.net> <4i5pb4$fae@sparcserver.lrz-muenchen.de> <4i79pd$slk@news.netam.net>
  9. NNTP-Posting-Host: xs1.xs4all.nl
  10. X-Newsreader: NN version 6.5.0 #666 (NOV)
  11.  
  12. bgc@alpha.netam.net (The Bowling Green Connection) writes:
  13.  
  14. >ua302aa@lrz-muenchen.de wrote:
  15. >: I fail to see where you want to _write_ to "file.txt"
  16.  
  17. >I have a queue set up on the internet to mail mime-format
  18. >messages to myself (there is a reason why, but it's
  19. >too long for me to explain now).  Basically, from a 
  20. >browser you can click a submit button which will call
  21. >this SendMail procedure.  The procedure extracts information
  22. >from the fillout form on the page and creates a text file
  23. >under the name of mime.body in Unix.
  24.  
  25. >Now, since it is possible for two or more people to submit
  26. >messages at the same time, I have to make sure that the
  27. >mime.body file is locked (I use the flock() procedure)
  28.  
  29. Why?  Surely you can use tmpnam() to create a unique filename
  30. for each invocation of your SendMail function?
  31.  
  32. Frank
  33. --
  34. The famous GIICM now on line:  http://www.xs4all.nl/~falstaff/GIICM.html
  35. ------------------------------------------------------------------------
  36. Frank A. Vorstenbosch        +31-(70)-355 5241        falstaff@xs4all.nl
  37.